import request from '../utils/requests'

function buildUrl(url) {
  return 'http://comment.bingdou.site' + url
}
export function callBackChoose(data) {
  return request({
    url: buildUrl('/v1/callback/choose'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function callBackDetail(data) {
  return request({
    url: buildUrl('/v1/callback/detail'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function getRecent(data) {
  return request({
    url: buildUrl('/v1/callback/recent'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function getBackendList(data) {
  return request({
    url: buildUrl('/v1/backend/users'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function getProjectList(data) {
  return request({
    url: buildUrl('/v2/backend/project_list'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function closeCommentControl(data) {
  return request({
    url: buildUrl('/v1/comment/user_control/close'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function openCommentControl(data) {
  return request({
    url: buildUrl('/v1/comment/user_control/open'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function closeCommentControls(data) {
  return request({
    url: buildUrl('/v2/comment/control/close'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function openCommentControls(data) {
  return request({
    url: buildUrl('/v2/comment/control/open'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function oauthUrl(data) {
  return request({
    url: buildUrl('/v1/oauth/url'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function getReplyTemplateUpload(data) {
  return request({
    url: buildUrl('/v1/file/reply_template/upload'),
    method: 'post',
    header: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}
export function getReplyTemplateList(data) {
  return request({
    url: buildUrl('/v1/comment/reply_template/list'),
    method: 'post',
    header: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}

export function getReplyTemplateDisable(data) {
  return request({
    url: buildUrl('/v1/comment/reply_template/disable'),
    method: 'post',
    header: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
}

export function getHourPlanList(data) {
  return request({
    url: buildUrl('/v1/ad/static/hour'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}



export function getSonList(data) {
  return request({
    url: buildUrl('/v1/merchant/son/all'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}









export function getLinearList(data) {
  return request({
    url: buildUrl('/v1/pdd/linear/list'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function openReply(data) {
  return request({
    url: buildUrl('/v1/comment/user_auto_reply/open'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}


export function openRefund(data) {
  return request({
    url: buildUrl('/v1/user/convert_refund_order/operate'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function getCommentsList(data) {
  return request({
    url: buildUrl('/v1/backend/comments'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function CommentsHide(data) {
  return request({
    url: buildUrl('/v1/comment/hide'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function CommentsReply(data) {
  return request({
    url: buildUrl('/v1/comment/reply'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function CommentsStick(data) {
  return request({
    url: buildUrl('/v1/comment/stick'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function CommentsAutoReplyOpen(data) {
  return request({
    url: buildUrl('/v2/comment/auto_reply/open'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function CommentsAutoReplyClose(data) {
  return request({
    url: buildUrl('/v2/comment/auto_reply/close'),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}

// 素材上传
export function uploadMaterial (data) {
  return request({
    url: buildUrl("/v1/video_library/material/upload"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 获取文件夹列表
export function getFolders (data) {
  return request({
    url: buildUrl("/v1/video_library/folder/list"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 获取素材列表
export function getMaterialList (data) {
  return request({
    url:  buildUrl("/v1/video_library/material/list"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 删除视频
export function batchDeleteVideo (data) {
  return request({
    url: buildUrl("/v1/video_library/material/delete"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 修改文件夹名称
export function updateFolderName (data) {
  return request({
    url: buildUrl("/v1/video_library/folder/update_name"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 删除文件夹
export function removeFolder (data) {
  return request({
    url: buildUrl("/v1/video_library/folder/delete"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 新建文件夹
export function createNewFolder (data) {
  return request({
      url: buildUrl("/v1/video_library/folder/create"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function companyOssUrls (data) {
  return request({
    url: buildUrl("/v1/merchant/company/oss_url"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 创建任务接口
export function getVideoCreate (data) {
  return request({
    url:buildUrl("/v1/video_clip/task/create"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 获取任务列表接口
export function getTaskList (data) {
  return request({
    url: buildUrl("/v1/video_clip/task/list"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function getWaitingTask (data) {
  return request({
    url: buildUrl("/v1/video_clip/waiting/task"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 根据任务ID获取视频列表接口
export function getVideoList (data) {
  return request({
    url: buildUrl("/v1/video_clip/task/detail"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function getReplyList (data) {
  return request({
    url: buildUrl("/v1/comment/reply_template/list"),
    method: 'post',
    header: {
      'Content-Type': 'application/json'
    },
    data
  })
}
